package com.ruoyi.purchase.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName po_firm
 */
@TableName(value ="po_firm")
@Data
public class PoFirm implements Serializable {
    /**
     * 商品厂商id
     */
    @TableId(type = IdType.AUTO)
    private Integer firmId;

    /**
     * 厂商名称
     */
    private String firmName;

    /**
     * 负责人
     */
    private String firmChargeUserId;

    /**
     * 联系电话
     */
    private String firmTel;

    /**
     * 所属区域城市
     */
    private Integer sysCityId;

    /**
     * 创建时间
     */
    private Date creatTime;

    /**
     * 商品状态(0:不可用；1:可用)
     */
    private String status;

    /**
     * 创建人
     */
    private Integer sysCreateUserId;

    /**
     * 厂商描述
     */
    private String firmDesc;

    /**
     * 联系地址
     */
    private String address;

    /**
     * 城市名称
     */
    @TableField(exist = false)
    private String cityName;

    /**
     * 省Id
     */
    @TableField(exist = false)
    private Integer provinceId;

    /**
     * 省名称
     */
    @TableField(exist = false)
    private String provinceName;

    /**
     * 创建人
     */
    @TableField(exist = false)
    private String createUsername;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PoFirm other = (PoFirm) that;
        return (this.getFirmId() == null ? other.getFirmId() == null : this.getFirmId().equals(other.getFirmId()))
            && (this.getFirmName() == null ? other.getFirmName() == null : this.getFirmName().equals(other.getFirmName()))
            && (this.getFirmChargeUserId() == null ? other.getFirmChargeUserId() == null : this.getFirmChargeUserId().equals(other.getFirmChargeUserId()))
            && (this.getFirmTel() == null ? other.getFirmTel() == null : this.getFirmTel().equals(other.getFirmTel()))
            && (this.getSysCityId() == null ? other.getSysCityId() == null : this.getSysCityId().equals(other.getSysCityId()))
            && (this.getCreatTime() == null ? other.getCreatTime() == null : this.getCreatTime().equals(other.getCreatTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getSysCreateUserId() == null ? other.getSysCreateUserId() == null : this.getSysCreateUserId().equals(other.getSysCreateUserId()))
            && (this.getFirmDesc() == null ? other.getFirmDesc() == null : this.getFirmDesc().equals(other.getFirmDesc()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFirmId() == null) ? 0 : getFirmId().hashCode());
        result = prime * result + ((getFirmName() == null) ? 0 : getFirmName().hashCode());
        result = prime * result + ((getFirmChargeUserId() == null) ? 0 : getFirmChargeUserId().hashCode());
        result = prime * result + ((getFirmTel() == null) ? 0 : getFirmTel().hashCode());
        result = prime * result + ((getSysCityId() == null) ? 0 : getSysCityId().hashCode());
        result = prime * result + ((getCreatTime() == null) ? 0 : getCreatTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getSysCreateUserId() == null) ? 0 : getSysCreateUserId().hashCode());
        result = prime * result + ((getFirmDesc() == null) ? 0 : getFirmDesc().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "PoFirm{" +
                "firmId=" + firmId +
                ", firmName='" + firmName + '\'' +
                ", firmChargeUserId='" + firmChargeUserId + '\'' +
                ", firmTel='" + firmTel + '\'' +
                ", sysCityId=" + sysCityId +
                ", creatTime=" + creatTime +
                ", status='" + status + '\'' +
                ", sysCreateUserId=" + sysCreateUserId +
                ", firmDesc='" + firmDesc + '\'' +
                ", address='" + address + '\'' +
                ", cityName='" + cityName + '\'' +
                ", provinceId=" + provinceId +
                ", provinceName='" + provinceName + '\'' +
                ", cUsername='" + createUsername + '\'' +
                '}';
    }
}